<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //九九乘法表
        var str;
        for(var i=1;i<=9;i++){//行
        str="";//每一行的时候str从空字符串开始
            for(var j=1;j<=i;j++){//列
                // console.log(i+"*"+j+"="+(i*j));
                str=str+i+"*"+j+"="+(i*j)+"  ";//+是连接符
            }
            console.log(str);//一行执行一次输出
        }
       
    </script>
</head>
<body>
    <!-- i=1;
    for(;;); -->
</body>
</html>